package com.market2.utils;

import javax.persistence.EntityManager;

public class EntityManagerThreadLocal {
	private static final ThreadLocal<EntityManager> entityManagerLocal = new ThreadLocal<EntityManager>();

	public static void set(EntityManager user) {
		entityManagerLocal.set(user);
	}

	public static void unset() {
		entityManagerLocal.remove();
	}

	public static EntityManager get() {
		return entityManagerLocal.get();
	}
}
